Skip to content

Dependency hygiene: pin Dockerfile base images by digest + npm audit fix#72

Closed
ibuilder wants to merge 2 commits into
mainfrom
chore/dep-hygiene
Closed

Dependency hygiene: pin Dockerfile base images by digest + npm audit fix#72
ibuilder wants to merge 2 commits into
mainfrom
chore/dep-hygiene

Conversation

@ibuilder

Copy link
Copy Markdown
Owner

Tier-1 follow-up to the production/enterprise audit. Dependency-only (no application source). Extends PR #69's supply-chain work to the Dockerfile FROM lines and fixes a dev-only npm advisory.

1. Pin Dockerfile base images by digest (SEC F4)

  • Files: services/api/Dockerfile, apps/web/Dockerfile, services/converter/Dockerfile, .github/dependabot.yml
  • All 6 FROM lines pinned by @sha256: digest instead of mutable tags (node:20-slim, python:3.12-slim, nginx:alpine). Digests resolved via the Docker Hub registry API and verified as multi-platform OCI indexes (docker/buildx unavailable in the sandbox).
  • Added 3 package-ecosystem: docker Dependabot entries (one per Dockerfile directory) so digests auto-bump weekly. YAML validated.

Merge-order note: these FROM lines currently reference node:20-slim (current main). PR #69 (#69) bumps them to node:22-slim. If #69 merges first, this branch's node:20-slim@sha256:... pins will conflict and should be rebased onto node:22-slim digests (Dependabot will also re-resolve). Recommend merging #69 first, then rebasing this.

2. npm audit fix — dev/docs chain (SEC F6)

  • File: apps/web/package.json + root package-lock.json
  • Fixed: fast-uri 3.1.2 → 3.1.4 (GHSA-v2hh-gcrm-f6hx, GHSA-4c8g-83qw-93j6, via vite-plugin-pwa → workbox-build → ajv → fast-uri). Lock regenerated with --install-strategy=nested.
  • Deferred: nested js-yaml/@redocly/openapi-core — the fix ships in redocly 2.x, but openapi-typescript@7.13.0 caps redocly at <2.0.0 (1.34.17 hard-pins js-yaml 4.2.0). Unfixable without a breaking major; left per the spec.
  • npm audit 3 high → 2 high (deferred pair, both dev-only). npm audit --omit=dev stays 0.

Validations

```task
file:services/api/Dockerfile
file:apps/web/Dockerfile
file:services/converter/Dockerfile
file:.github/dependabot.yml
file:apps/web/package.json
file:package-lock.json
```

ibuilder and others added 2 commits July 22, 2026 15:40
Pin every FROM line in the API, web, and converter Dockerfiles to the
exact current multi-platform @sha256 index digest instead of mutable
tags, for supply-chain integrity. Digests resolved from the Docker Hub
registry (OCI image index, equivalent to buildx imagetools inspect):

  node:20-slim    sha256:2cf067cf...febfc0
  python:3.12-slim sha256:57cd7c3a...710de
  nginx:alpine    sha256:4a73073b...c1752

Add a docker ecosystem to Dependabot (per-Dockerfile directory) so these
digests auto-bump weekly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Resolve the high-severity fast-uri advisories (GHSA-v2hh-gcrm-f6hx,
GHSA-4c8g-83qw-93j6) pulled in transitively via
vite-plugin-pwa -> workbox-build -> ajv -> fast-uri. `npm audit fix`
bumps the nested fast-uri to 3.1.4. Lock regenerated with npm's nested
install strategy (npm install --package-lock-only --install-strategy=nested)
to keep the tree correct; package.json is unchanged.

Deferred: the nested js-yaml (GHSA-52cp-r559-cp3m) via
@redocly/openapi-core is NOT fixable without a breaking major. The fix
lives in @redocly/openapi-core 2.x, but openapi-typescript@7.13.0 (the
latest release) pins @redocly/openapi-core ^1.34.6, whose newest 1.x
(1.34.17) hard-pins js-yaml 4.2.0. Left per spec (no breaking bumps).

npm audit --omit=dev stays at 0 vulnerabilities.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ibuilder added a commit that referenced this pull request Jul 23, 2026
ibuilder added a commit that referenced this pull request Jul 23, 2026
…ion bump + CHANGELOG

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ibuilder

Copy link
Copy Markdown
Owner Author

Landed in v0.3.586 (merged into main with the full suite re-verified — 313/313 green). Thanks!

@ibuilder ibuilder closed this Jul 23, 2026
@ibuilder
ibuilder deleted the chore/dep-hygiene branch July 23, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant